//
//  HomeAddCell.m
//  ZhuoxinAgriculture
//
//  Created by stone on 16/12/4.
//  Copyright © 2016年 stone. All rights reserved.
//

#import "HomeAddCell.h"
#import "Masonry.h"
@interface HomeAddCell()
/** imageView */
@property (weak, nonatomic) UIImageView * iconImageView;
@end
@implementation HomeAddCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {

        
        UIImageView * iconImageView = ({
            UIImageView * imageView = [[UIImageView alloc] init];
//            imageView.backgroundColor = [UIColor colorWithWhite:0.5 alpha:1.0];
            UIImage * image = [UIImage imageNamed:@"home_ico_add"];
            imageView.image = image;
            
            [self.contentView addSubview:imageView];
            
            [imageView mas_makeConstraints:^(MASConstraintMaker * make) {
//                make.left.mas_equalTo(self.contentView.mas_left).offset(0);
//                make.right.mas_equalTo(self.contentView.mas_right).offset(0);
                make.centerY.mas_equalTo(self.contentView.mas_centerY).offset(0);
                make.centerX.mas_equalTo(self.contentView.mas_centerX).offset(0);
                
                make.width.mas_equalTo(image.size.width);
                make.height.mas_equalTo(image.size.height);
                
            }];
            
            imageView;
        });
        self.iconImageView = iconImageView;
    }
    return self;
}
@end
